home *** CD-ROM | disk | FTP | other *** search
/ Aminet 31 / Aminet 31 (1999)(Schatztruhe)[!][Jun 1999].iso / Aminet / comm / mail / iris.lha / Iris / Install-Iris < prev    next >
Text File  |  1999-04-25  |  10KB  |  466 lines

  1. ;$VER: Install-Iris 1.9 (25.4.99)
  2.  
  3. (welcome)
  4.  
  5. (if
  6.     (=
  7.         (askchoice
  8.             (prompt "Select disired action.")
  9.             (choices "Install" "Update")
  10.             (default 0)
  11.             (help "'Update' will only copy the changed or new files. Installer will fail if you select 'Install' for an update.")
  12.         )
  13.     1)
  14.  
  15. ;** UPDATE **********************************************************
  16. (
  17. (message (cat 
  18.     "Installing Iris V1.9"
  19. ))
  20.  
  21. (set #destdir
  22.     (askdir
  23.         (prompt "Where is the Iris program?")
  24.         (default @default-dest)
  25.         (help @askdir-help)
  26.     )
  27. )
  28. (set #doc-dir
  29.     (askdir
  30.         (prompt "Where is the Iris documentation?")
  31.         (default #destdir)
  32.         (help @askdir-help)
  33.     )
  34. )
  35. (set #smtpd
  36.     (askbool
  37.         (prompt "Should the script for smtpd be installed?")
  38.         (default 1)
  39.         (help "This script can be used to read messages from other sources into Iris. It is mainly interesting for use with smtpd.")
  40.     )
  41. )
  42.  
  43. (set #lib-dest
  44.     (askdir
  45.         (prompt "Where should the asyncio.library be installed?\nA version check will be performed.")
  46.         (help @askdir-help)
  47.         (default "LIBS:")
  48.     )
  49. )
  50.  
  51. (copylib
  52.     (prompt "Copying asyncio.library...")
  53.     (confirm)
  54.     (source "libs/asyncio.library")
  55.     (dest #lib-dest)
  56.     (help @copylib-help)
  57. )
  58.  
  59. (copyfiles
  60.     (prompt "Copying documentation...")
  61.     (source "Iris.guide")
  62.     (dest #doc-dir)
  63.     (all)
  64. )
  65. (copyfiles
  66.     (prompt "Copying program...")
  67.     (source "Iris")
  68.     (dest #destdir)
  69.     (noposition)
  70. )
  71. (copyfiles
  72.     (prompt "Copying Poll.irx script...")
  73.     (source "Poll.irx")
  74.     (dest #destdir)
  75. )
  76. (copyfiles
  77.     (prompt "Copying DelFolder.irx script...")
  78.     (source "DelFolder.irx")
  79.     (dest #destdir)
  80. )
  81. (copyfiles
  82.     (prompt "Copying .mailcap file...")
  83.     (source ".mailcap")
  84.     (dest #destdir)
  85. )
  86. (if #smtpd
  87.     (copyfiles
  88.         (prompt "Copying IrisRMail.irx script...")
  89.         (source "IrisRMail.irx")
  90.         (dest #destdir)
  91.     )
  92. )
  93. (copyfiles
  94.     (prompt "Copying DelFolder.irx icon...")
  95.     (source (tackon #destdir "Poll.irx.info"))
  96.     (dest #destdir)
  97.     (infos)
  98.     (noposition)
  99.     (newname "DelFolder.irx.info")
  100. )
  101. (set #storage-dir (tackon #destdir "Storage"))
  102. (if (not (exists #storage-dir))
  103. (
  104.     (makedir #storage-dir)
  105.     (copyfiles
  106.         (prompt "Copying Storage icon...")
  107.         (source (tackon #destdir "Buttons.info"))
  108.         (dest #destdir)
  109.         (newname "Storage.info")
  110.     )
  111.     (rename (tackon #destdir "Buttons") (tackon #storage-dir "Old_Buttons"))
  112.     (rename (tackon #destdir "Buttons.info") (tackon #storage-dir "Old_Buttons.info"))
  113.     (working "Making links...")
  114.     (run "MakeLink" "HARD" "FORCE" (tackon #destdir "Buttons") (tackon #storage-dir "Old_Buttons"))
  115.     (run "MakeLink" "HARD" "FORCE" (tackon #destdir "Buttons.info") (tackon #storage-dir "Old_Buttons.info"))
  116. ) ;endblock
  117. ) ;endif
  118. (copyfiles
  119.     (prompt "Copying buttons...")
  120.     (source "Storage")
  121.     (dest #storage-dir)
  122.     (all)
  123.     (infos)
  124.     (noposition)
  125. )
  126. (copyfiles
  127.     (prompt "Copying Install-Buttons...")
  128.     (source "Install-Buttons")
  129.     (dest #destdir)
  130.     (infos)
  131.     (noposition)
  132. )
  133. (set @default-dest #destdir)
  134.  
  135. (message
  136.     "Please edit the .mailcap file in the Iris drawer."
  137. )
  138.  
  139. (exit)
  140. ) ; endblock
  141. ) ; endif
  142.  
  143. ;** INSTALL *********************************************************
  144.  
  145. (set #destdir
  146.     (askdir
  147.         (prompt "Where should the Iris drawer be created?")
  148.         (default @default-dest)
  149.         (help @askdir-help)
  150.     )
  151. )
  152. (set @default-dest #destdir)
  153. (set #parent-dir #destdir)
  154. (set #doc-dir
  155.     (askdir
  156.         (prompt "Where do you want to install the documentation (AmigaGuide)?")
  157.         (default (tackon #destdir "Iris"))
  158.         (newpath)
  159.         (help @askdir-help)
  160.     )
  161. )
  162. (set #icons
  163.     (askchoice
  164.         (prompt "Which icons do you want to install?")
  165.         (choices "Standard" "MagicWB")
  166.         (default 0)
  167.         (help @askchoice-help)
  168.     )
  169. )
  170. (set #copycfg
  171.     (askbool
  172.         (prompt "Should the sample configuration file be copied?")
  173.         (choices "Yes" "No")
  174.         (default 1)
  175.         (help "This config already contains some folders and filters.")
  176.     )
  177. )
  178.  
  179. (set #buttons
  180.     (askchoice
  181.         (prompt "Which buttons do you want to use?")
  182.         (choices "Image (MWB)" "Text (MWB)" "GT (4 colour)" "XEN (4 colour)")
  183.         (default (if (= #icons 1) 0 2))
  184.         (help
  185.             (cat "Text buttons created by Karl Schon.\n"
  186.             "Image buttons (Eudora like) created by Menno and Jilles Tjoelker.\n"
  187.             "GT buttons created by Jilles Tjoelker.\n"
  188.             "XEN buttons created by Russell Stapleton.\n"
  189.             "Use the Workbench to see how they look like (directory \""
  190.             (tackon #destdir "Iris/Storage")
  191.             "\").\n"
  192.             @askchoice-help)
  193.         )
  194.     )
  195. )
  196. (select #buttons
  197.     (set #buttons-dir "Image_Buttons")
  198.     (set #buttons-dir "Text_Buttons")
  199.     (set #buttons-dir "GT_Buttons")
  200.     (set #buttons-dir "XEN_Buttons")
  201. )
  202.  
  203. (set #browsewww
  204.     (askfile
  205.         (prompt "Which WWW browser do you use?")
  206.         (help @askfile-help)
  207.         (default "BrowseWWWscripts/AWeb")
  208.     )
  209. )
  210. (if (not (patmatch "#?AWeb#?" #browsewww))
  211.     (message "Warning: the selected script has not been tested.")
  212. )
  213.  
  214. (set #smtpd
  215.     (askbool
  216.         (prompt "Should the script for smtpd be installed?")
  217.         (default 1)
  218.                 (help "This script can be used to read messages from other sources into Iris. It is mainly interesting for use with smtpd.")
  219.     )
  220. )
  221.  
  222. (set #ext
  223.     (askchoice
  224.         (prompt "Which version of the bgui.library do you want to install?")
  225.         (choices "Standard" "Extended (AmigaOS 3.0 and 68020 required)")
  226.         (default 0)
  227.         (help @askchoice-help)
  228.     )
  229. )
  230. (if (= #ext 0)
  231.     (set #bgui-lib "libs/bgui.library")
  232.     (set #bgui-lib "libs/bgui.library_e")
  233. )
  234. (set #lib-dest
  235.     (askdir
  236.         (prompt "Where should the bgui.library and the asyncio.library be installed?\nA version check will be performed.")
  237.         (help @askdir-help)
  238.         (default "LIBS:")
  239.     )
  240. )
  241. (set #classes-dest
  242.     (askdir
  243.         (prompt "Where should the class 'bgui_popbutton.gadget be installed?")
  244.         (help @askdir-help)
  245.         (default "LIBS:Gadgets/")
  246.         (newpath)
  247.     )
  248. )
  249.  
  250. (copylib
  251.     (prompt "Copying bgui.library...")
  252.     (confirm)
  253.     (source #bgui-lib)
  254.     (dest #lib-dest)
  255.     (newname "bgui.library")
  256.     (help @copylib-help)
  257. )
  258. (copylib
  259.     (prompt "Copying asyncio.library...")
  260.     (confirm)
  261.     (source "libs/asyncio.library")
  262.     (dest #lib-dest)
  263.     (help @copylib-help)
  264. )
  265. (copylib
  266.     (prompt "Copying bgui_popbutton.gadget")
  267.     (confirm)
  268.     (source "classes/gadgets/bgui_popbutton.gadget")
  269.     (dest #classes-dest)
  270.     (help @copylib-help)
  271. )
  272.  
  273. (set #destdir (tackon #destdir "Iris"))
  274. (set @default-dest #destdir)
  275. (makedir #destdir)
  276. (set #buttons-dest (tackon #destdir "Buttons"))
  277. (set #sig-dest (tackon #destdir "Signatures"))
  278. (makedir #sig-dest (infos))
  279. (copyfiles
  280.     (prompt "Copying signature...")
  281.     (dest #sig-dest)
  282.     (source "Signatures/Standard")
  283.     (infos)
  284.     (noposition)
  285. )
  286. (makedir (tackon #destdir "Mail"))
  287. (copyfiles
  288.     (prompt "Copying program...")
  289.     (source "Iris")
  290.     (dest #destdir)
  291.     (infos)
  292.     (noposition)
  293. )
  294. (set #storage-dir (tackon #destdir "Storage"))
  295. (makedir #storage-dir (infos))
  296. (copyfiles
  297.     (prompt "Copying buttons...")
  298.     (source "Storage")
  299.     (dest #storage-dir)
  300.     (all)
  301.     (infos)
  302.     (noposition)
  303. )
  304. (working "Making links...")
  305. (run "MakeLink" "HARD" "FORCE" (tackon #destdir "Buttons") (tackon #storage-dir #buttons-dir))
  306. (run "MakeLink" "HARD" "FORCE" (tackon #destdir "Buttons.info") (cat (tackon #storage-dir #buttons-dir) ".info"))
  307. (copyfiles
  308.     (prompt "Copying Install-Buttons...")
  309.     (source "Install-Buttons")
  310.     (dest #destdir)
  311.     (infos)
  312.     (noposition)
  313. )
  314. (if #copycfg
  315.     (copyfiles
  316.         (prompt "Copying sample configuration file...")
  317.         (source "Iris.cfg")
  318.         (dest #destdir)
  319.     )
  320. )
  321. (copyfiles
  322.     (prompt "Copying BrowseWWW.rexx script...")
  323.     (source #browsewww)
  324.     (dest #destdir)
  325.     (newname "BrowseWWW.rexx")
  326. )
  327. (copyfiles
  328.     (prompt "Copying Poll.irx script...")
  329.     (source "Poll.irx")
  330.     (dest #destdir)
  331.     (infos)
  332.     (noposition)
  333. )
  334. (copyfiles
  335.     (prompt "Copying DelFolder.irx script...")
  336.     (source "DelFolder.irx")
  337.     (dest #destdir)
  338.     (infos)
  339.     (noposition)
  340. )
  341. (copyfiles
  342.     (prompt "Copying MoveMsg.irx script...")
  343.     (source "MoveMsg.irx")
  344.     (dest #destdir)
  345.     (infos)
  346.     (noposition)
  347. )
  348. (copyfiles
  349.     (prompt "Copying StoreMsg.irx script...")
  350.     (source "StoreMsg.irx")
  351.     (dest #destdir)
  352.     (infos)
  353.     (noposition)
  354. )
  355. (copyfiles
  356.     (prompt "Copying .mailcap file...")
  357.     (source ".mailcap")
  358.     (dest #destdir)
  359. )
  360. (if #smtpd
  361.     (copyfiles
  362.         (prompt "Copying IrisRMail.irx script...")
  363.         (source "IrisRMail.irx")
  364.         (dest #destdir)
  365.     )
  366. )
  367. (copyfiles
  368.     (prompt "Copying documentation...")
  369.     (source "Iris.guide")
  370.     (dest #doc-dir)
  371.     (infos)
  372.     (all)
  373. )
  374.  
  375. (if (= #icons 1)
  376.     (
  377.         (copyfiles
  378.             (prompt "Copying MagicWB style drawer icon...")
  379.             (source "MWB-Icons/Iris_drw.info")
  380.             (dest #parent-dir)
  381.             (newname "Iris.info